const userService = require('../services/userService.js')

class userController {
    async register(ctx) {
        const body = await userService.register(ctx)
        ctx.body = body
    }
    async login(ctx) {
        const body = await userService.login(ctx)
        ctx.body = body
    }
    async modify(ctx) {
        const body = await userService.modify(ctx)
        ctx.body =  body
    }
    async delete(ctx) {
        const body = await userService.delete(ctx)
        ctx.body =  body
    }
    async allMsg(ctx) {
        const body = await userService.allMsg(ctx)
        ctx.body =  body
    }
    async test(ctx){
        const body = await userService.test(ctx)
        ctx.body = body
    }
    async updateUserPassword(ctx){
        const body = await userService.updateUserPassword(ctx)
        ctx.body = body
    }
}

module.exports = new userController();